class Solution(object):

    def __init__(self, nums):
        """
        :type nums: List[int]
        """
        self.ini_nums = nums
        self.new_nums = nums
    def reset(self):
        """
        Resets the array to its original configuration and return it.
        :rtype: List[int]
        """
        self.new_nums = self.ini_nums
        return self.new_nums

    def shuffle(self):
        """
        Returns a random shuffling of the array.
        :rtype: List[int]
        """
        index = list(range(len(self.new_nums)))
        res = []
        def helper(res, index):
            import random
            if not len(index):
                return
            print(index)
            loc = int(random.random() * len(index))
            res.append(self.new_nums[index[loc]])
            index.pop(loc)
            helper(res, index)
        helper(res, index)
        self.new_nums = res
        return self.new_nums

test = Solution([1,2,3])
print(test.shuffle())




# Your Solution object will be instantiated and called as such:
# obj = Solution(nums)
# param_1 = obj.reset()
# param_2 = obj.shuffle()